package tech_web.yml_to_data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
//组件自动配置
@Component

public class Dog {
    @Value("na")
    private String name;
    @Value("3")
    private int age;
    public Dog(String name, int age) {
        this.name = name;
        this.age = age;
    }
    public Dog(){}
    @Override
    public String toString() {
        return "Dog{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }




}
